//
//  VWPlayerNoDataBlockLayer.swift
//  VideoPlayer_Example
//
//  Created by JY_NEW on 2021/10/15.
//  Copyright © 2021 CocoaPods. All rights reserved.
//

import ijkPlayerManager
import UIKit
import UICreate

/// 网络状态
class VWPlayerNoDataBlockLayer: VWPlayerBaseBlockLayer {
    
    override func loadContainerView(_ containerView: UIView) {
        containerView.backgroundColor = .black
        containerView.add(contentView, layout: .centerY, .marginX)
        
        super.loadContainerView(containerView)
    }
    
    // MARK: 界面控件
    
    lazy var contentView: UIView = {
        let contentView = UIView()
        
        let image = UIImageView(.image("vw_play_nodata_error"))
        let title = UILabel(.text("好片正在努力开拓\n中，敬请期待哦～"), .font(.pingfang(medium: 14)), .color(.white), .lines())
        
        contentView.add {
            image.layout(.top, .centerX)
            title.layout(.bottomTop(4), .centerX)
                .layout(for: .parent, .bottom)
        }
        return contentView
    }()
}
